home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / ter12b.zip / TER12B._XE / DOCS.EXE / ANSMUSIC.DOC next >
Text File  |  1993-08-02  |  9KB  |  221 lines

  1.  
  2.                                ANSI MUSIC
  3. ──────────────────────────────────────────────────────────────────────────────
  4.  
  5.  
  6. These are the specifications Terminate follows. If you are a sysop you could 
  7. include ansi music in your menus and then your users using Terminate or other 
  8. terminal program could hear melodies or fancy tunes when they enter the menu. 
  9. Other terminal program will just skip the codes - nothing else will happen. 
  10. Maybe it will look weird on your screen, because your BBS system does not 
  11. understand the codes - but it does'nt matter at all.
  12.  
  13. I use this little code in my LOGO.ANS (Remote Access file shown at login):
  14.  
  15. MB O3 T120 L2CO4CO3L6BGABO4L2CO3L2CL2AL1GL2CFL4EL6CDEL4FL3DL6O2BO3CDL4EL2C
  16.  D
  17.  
  18. As you can see I clear the screen ([2J), right after the sound codes so
  19. programs that don't support ansi music won't see the codes.
  20.  
  21. It's really simple to create this music. Hopefully many more will start
  22. using those codes inside online games etc.
  23.  
  24. Small examples:
  25.  
  26. MB O3     Sets octave 3
  27. MB T120   Sets tempo to 120 (default)
  28.  
  29. You can use several statements on each line. Couldn't be more simple!
  30. It's exactly the same command as the BASIC command called PLAY from
  31. IBM BASIC or GW-BASIC, etc.
  32.  
  33. Download  A3E*.* or filerequest MAGIC: A3E with the point system, for the
  34. latest version available on DAN BBS. Then you can easily make your own
  35. music ANSI-menus. All MIDI, Sound BBS systems... MUST have this!!!!!!!!
  36.  
  37. ------------------------------------- CUT -------------------------------------
  38.  
  39.          MUSIC:
  40.  
  41.           Syntax: ESC[MF T120 O2C8D8E8F8G8 (All lines must end with ASCII 14)
  42.  
  43.           Music strings in the BASIC Play format are supported.
  44.           Multiple strings per line may be entered.
  45.  
  46.           Music strings should begin with the characters "<esc>[M"
  47.           where <esc> is a true ESC character (DEC 27, Hex 1B).
  48.           Please refer to your BASIC manual for information on the
  49.           BASIC Play commands.  The following are all valid for
  50.           beginning a Music string in SMILE: MF, MB, MN, ML, MS, M .
  51.           Although MB (Music Background) is valid, true backgroud
  52.           music is NOT supported.
  53.  
  54.           Music strings should end with the musical note character
  55.           (DEC 14, Hex 0E, CTRL-N).  If this character is missing,
  56.           SMILE will look for the next ESC character or the
  57.           end-of-line marker to terminate the music string.  This
  58.           option was added to try and catch as many incorrectly
  59.           formatted music strings as possible.  However, for
  60.           compatability with other viewers, I suggest you always end
  61.           your music strings with CTRL-N (DEC 14)
  62.  
  63.  
  64.                                 OCTAVES AND TONES
  65.                                 -----------------
  66.       A-G  Plays A, B, ..., G in current octave
  67.            # or +  After the note specifies sharp
  68.                 -  After the note specifies flat
  69.         >  Increases octave by 1. Octave cannot go beyond 6.
  70.            >> Increases by 2 octaves, etc.
  71.  
  72.         <  Decreases octave by 1. Octave cannot drop below 0.
  73.            << Decreases by 2 octaves, etc.
  74.  
  75.        OCTAVE:
  76.        On  Sets current octave (0-6)
  77.            Sets the current octave. There are seven octaves,
  78.            numbered 0-6.
  79.  
  80.        NOTE:
  81.        Nn  Plays note n (0-84)
  82.            The range for n is 0-84.  In the seven possible
  83.            octaves, there are 84 notes.  When n = 0, this means a rest.
  84.  
  85.           *(Below is a listing of notes, both by MUSIC CODES and
  86.             by SOUND CODES)
  87.  
  88.                             TONE DURATION AND TEMPO
  89.                             -----------------------
  90.       LENGTH:
  91.       Ln  Sets length of a note. (1-64)
  92.           The range for n is 1-64.  L 4 is a quarter note,  L 1 is a
  93.           whole note, etc.
  94.  
  95.           The length may also follow the note when a change of
  96.           length only is desired for a particular note. For
  97.           example,
  98.                    A 16 can be equivalent to L 16 A
  99.  
  100.       TEMPO:
  101.       Tn  Sets number of quarter notes per minute (32-255)
  102.           The range for n is 32-255. The default for n is 120.
  103.  
  104.           Note: Because of the slow clock-interrupt rate, some notes
  105.                 will not play at higher tempos (L 64 at T 255, for
  106.                 example).
  107.  
  108.       MUSIC STACCATO:
  109.       MS  Sets "music staccato" so that each note will play 3/4 of
  110.           the time determined by the length (L).
  111.  
  112.       MUSIC NORMAL:
  113.       MN  Sets "music normal" so that each note will play 7/8 of
  114.           the time determined by the length (L).
  115.  
  116.       MUSIC LEGATO:
  117.       ML  Sets "music legato" so that each note will play the full
  118.           period set by length (L).
  119.  
  120.       PAUSE:
  121.       Pn  Pause for the duration of n quarternotes (1-64)
  122.           Specifies a pause, ranging from 1-64. This option
  123.           corresponds to the length of each note, set with Ln.
  124.  
  125.       DOT:
  126.       .   A period after a note causes the note to play 3/2 times
  127.           the length determined by L (length) times T (tempo). The
  128.           period has the same meaning as in a musical score.
  129.  
  130.           Multiple periods can appear after a note. Each period
  131.           adds a length equal to one half the length of the previous
  132.           period. For example,
  133.                "A."   plays 1 + 1/2 or 3/2 times the length
  134.                "A.."  plays 1 + 1/2 + 1/4 or 7/4 times the length.
  135.  
  136.           Periods can appear after a pause (P). In this case, the
  137.           pause length is scaled in the same way notes are scaled.
  138.  
  139.                                    OPERATION
  140.                                    ---------
  141.       MUSIC FOREGROUND:
  142.       MF  Sets music/sound to run in foreground
  143.  
  144.       MUSIC BACKGROUND:
  145.       MB  Sets music/sound to run in background
  146.  
  147.       See the manual (MANUALS.DOC) for more details on MF and MB.
  148.  
  149.  
  150.                                   SOUND
  151.                                   -----
  152.       ( Thanks to Julie Ibarra, author of ANSIPLAY for this idea )
  153.  
  154.       Syntax:
  155.       ESC[MF Freq; Duration; Cycles; CycleDelay;Variation (DEC14)
  156.  
  157.       Custom Sounds are supported in SMILE by using a SOUND CODE
  158.       similar to that found in BASIC and the program ANSIPLAY.
  159.       However, the SOUND generator in SMILE differs from the
  160.       SOUND command in BASIC.  Therefore, different frequency
  161.       values must be used to produce the musical notes.  These
  162.       are listed somewhere down the page.
  163.  
  164.       The SOUND statement must begin and end in the same manner
  165.       discussed above for a normal music string.  The SOUND CODE
  166.       consists of the following parameters serparated by a
  167.       semicolon (;) :
  168.  
  169.       FREQ     : Frequency of note to be played.  The affective
  170.                  range of frequencies is 0 to 7904.
  171.                  (0..65535)
  172.  
  173.       DURATION : Time, in milliseconds, the note should be played.
  174.                  (0..65535)
  175.  
  176.       CYCLES   : Number of times to repeat Frequency/Duration.
  177.                  (0..65535)
  178.  
  179.       DELAY    : Time, in milliseconds, between cycles.
  180.                  (0..65535)
  181.  
  182.       VARIATION: Frequency value is changed by this number for
  183.                  each CYCLE the note is played.
  184.                  (-65535..65535)
  185.  
  186.  
  187.       (NOTE: 1 second = 1000 milliseconds)
  188.  
  189.  
  190.       Press ESC to exit a DURATION or DELAY action.  You may
  191.       have to press ESC a couple of times to completely exit
  192.       a sound sequence.
  193.  
  194.       SOUND CODE Musical Note Frequency Values (7 Octives):
  195.  
  196.  
  197.         C    C#   D    D#   E    F    F#   G    G#   A    A#   B
  198.  
  199.         65   69   73   78   82   87   92   98  104  110  116  123
  200.        131  139  147  156  165  175  185  196  208  220  233  247
  201.        262  278  294  312  330  350  370  392  416  440  466  494
  202.        524  556  588  624  660  700  740  784  832  880  932  988
  203.       1048 1112 1176 1248 1320 1400 1480 1568 1664 1760 1864 1976
  204.       2096 2224 2352 2496 2640 2800 2960 3136 3328 3520 3728 3952
  205.       4192 4448 4704 4992 5280 5600 5920 6272 6656 7040 7456 7904
  206.  
  207.  
  208.       One advantage of the SOUND CODE is the ability to place a
  209.       PAUSE in your ANSI screens without having to use a
  210.       multitude of ESC[s codes.  Just use a SOUND CODE with the
  211.       DELAY set very high to get a pause.  For example,
  212.  
  213.       ESC[MF ;;;60000
  214.  
  215.       would pause your ANSI Screen for 60 seconds, or until a key
  216.       is pressed when viewing it with SMILE.  Remember, these
  217.       SOUND CODES are not supported by bulletin boards...(yet)!
  218.  
  219. ------------------------------------- CUT -------------------------------------
  220.  
  221.